Copy php-fpm master config file:
  file.managed:
    - name: /etc/php-fpm.conf
    - source: salt://php/files/php-fpm.conf
    - user: root
    - group: root
    - mode: 644
    - template: jinja

Copy php-fpm www pool config file:
  file.managed:
    - name: /etc/php-fpm.d/www.conf
    - source: salt://php/files/www.conf
    - user: root
    - group: root
    - mode: 644
    - template: jinja

Setup php-fpm logrotate script:
  file.managed:
    - name: /etc/logrotate.d/php-fpm
    - source: salt://php/files/logrotate-php-fpm
    - template: jinja

php-fpm:
  service.running:
    - enable: True
    - listen:
      - pkg: Setup php
      - file: /etc/php-fpm.conf
      - file: /etc/php-fpm.d/www.conf
      - file: /etc/php.ini
